package uk.ac.bath.genetic.tests;


import uk.ac.bath.genetic.bool.Int;
import uk.ac.bath.genetic.bool.Diff;
import uk.ac.bath.genetic.bool.Off;
import uk.ac.bath.genetic.bool.Link;
import uk.ac.bath.genetic.bool.Cmp;
import uk.ac.bath.genetic.bool.And;
import uk.ac.bath.genetic.bool.Or;
import uk.ac.bath.genetic.bool.Mult;

import uk.ac.bath.genetic.bool.On;
import uk.ac.bath.genetic.bool.Not;
import uk.ac.bath.genetic.bool.LogicalMachine;
import java.io.*;
import java.util.*;
import uk.ac.bath.genetic.base.Operator;
import uk.ac.bath.genetic.base.Pallete;
import uk.ac.bath.genetic.base.PalleteIF;
import uk.ac.bath.genetic.base.Value;


class TestMachineCreate {



    public static void main(String args[]) {

	Vector<Operator> pallete = new Vector<Operator>();
        pallete.add(new And());
        pallete.add(new Or());
        pallete.add(new Not());
        pallete.add(new Link());
	// 	pallete.add(new X());
 	pallete.add(new Mult());
        pallete.add(new Cmp());
        pallete.add(new Diff());
        pallete.add(new On());
        pallete.add(new Off());
        pallete.add(new Int());


	if (args.length >= 1 ) {
	    // FIX ME MyRandom.setSeed(Integer.parseInt(args[0]));
	    //	    System.out.println(" Seeded ");
	}

	int n=Integer.parseInt(args[0]);
	LogicalMachine m= new LogicalMachine(n,new Pallete(pallete,new Value(0.0)));

	StringWriter w = new StringWriter();

	m.toString(w);

	System.out.println(w.toString());

    }


}
